﻿using System.Collections;
using System.IO;
using System.Web;

namespace ASPNETVN.PORTAL.Components.Configuration.Items
{
    public class Theme
    {
        public static string[] GetThemeList()
        {
            ArrayList ret = new ArrayList();
            string path = HttpContext.Current.Server.MapPath("~/App_Themes");
            if (Directory.Exists(path))
            {
                string[] dirs = Directory.GetDirectories(path);
                foreach (string s in dirs)
                {
                    string dir = s.Substring(s.LastIndexOf('\\') + 1);
                    ret.Add(dir);
                }
            }
            return (string[]) ret.ToArray(typeof (string));
        }
    }
}